import request from '@/utils/request'

// 登录
export function userLogin(data) {
  return request({
    url: '/login',
    method: 'post',
    data,
    // 表单登录
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function getInfo(token) {
  return request({
    url: '/getUserInfo',
    method: 'get',
    headers: {
      "token": token
    }
  })
}

export function getVerfyCode() {
  return request({
    url: '/getVerfyCode',
    method: 'get'
  })
}

export function logout(token) {
  return request({
    url: '/logout',
    method: 'get',
    headers: {
      "token": token
    }
  })
}